<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Dplayer播放器</title>
    <link href="https://cdn.bootcss.com/dplayer/1.22.2/DPlayer.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/dplayer/1.22.2/DPlayer.min.js"></script>
</head>

<body>
    <div id="dplayer"></div>
    <script>
        new DPlayer({
            container: document.getElementById('dplayer'),
            screenshot: true,
            video: {
                url: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.mp4',
                pic: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png',
                thumbnails: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara_thumbnails.jpg',
                type: 'auto'
            },
            subtitle: {
                url: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.vtt',
                type: 'webvtt',
                fontSize: '25px',
                bottom: '10%',
                color: '#b7daff'
            },
            danmaku: {
                id: '9E2E3368B56CDBB4',
                api: 'https://api.prprpr.me/dplayer/',
                token: 'tokendemo',
                maximum: 1000,
                addition: ['https://api.prprpr.me/dplayer/bilibili?aid=4157142'],
                user: 'DIYgod',
                bottom: '15%',
                unlimited: true
            },
            contextmenu: [
                {
                    text: 'custom1',
                    link: 'https://github.com/DIYgod/DPlayer'
                },
                {
                    text: 'custom2',
                    click: (player) => {
                        console.log(player);
                    }
                }
            ]
        });
    </script>
</body>

</html>